package com.tg.paw.common.generator;

import cn.hutool.core.lang.Snowflake;

/**
 * @author Rubble
 * Created on 2020/5/26
 */
public class IdGeneratorUtil {

    private static Snowflake snowflake;

    static void setSnowflake(Snowflake snowflake) {
        IdGeneratorUtil.snowflake = snowflake;
    }

    public static long nextId(){
        return snowflake.nextId();
    }

    public static String nextIdStr(){
        return snowflake.nextIdStr();
    }
}
